"""
配置模块 - 存放应用配置和常量
"""
import os
from dotenv import load_dotenv

# 加载环境变量
load_dotenv()

# JWT认证配置
SECRET_KEY = os.getenv("AUTH_SECRET_KEY", "your-secret-key-change-in-production")
ALGORITHM = "HS256"
ACCESS_TOKEN_EXPIRE_HOURS = 24  # token过期时间24小时

# 从环境变量获取登录密码，默认密码
AUTH_PASSWORD = os.getenv("AUTH_PASSWORD", "canshuxitong@123")

# CORS配置
CORS_ORIGINS = [
    "http://localhost:3000",
    "http://127.0.0.1:3000",
    "*",
]

# 实验结果存储根目录
EXPERIMENT_RESULTS_ROOT = os.getenv("EXPERIMENT_RESULTS_ROOT", "experiment_results")

